﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AntMovement.WPF.Model
{
    public class MenuItemModel : Prism.Mvvm.BindableBase, IComparable<MenuItemModel>
    {
        public bool IsSystem { get; set; }
        public int Index { get; set; }
        private string _name;

        public string Name
        {
            get { return _name; }
            set { SetProperty(ref _name, value); }
        }

        public Type View { get; set; }
        public Type ViewModel { get; set; }

        public void Update()
        {
            RaisePropertyChanged("Name");
        }

        public int CompareTo(MenuItemModel? other)
        {
            int result = 0;
            if (Index == other.Index) result = 0;
            if (Index > other.Index) result = 1;
            if (Index < other.Index) result = -1;
            return result;
        }
    }
}
